package com.itheima.homework.homework1;

public class MaoPao {
    public static void main(String[] args) {
        int[] arr  = {33,44,99,11,8,53};
        for (int i = 0; i < arr.length; i++) {
            for (int j = 0; j < arr.length-1-i; j++) {
                if (arr[j]>arr[j+1]){
                    arr[j]=arr[j]^arr[j+1];
                    arr[j+1]=arr[j]^arr[j+1];
                    arr[j]=arr[j]^arr[j+1];
                }
                System.out.print("[");
                for (int k = 0; k < arr.length; k++) {
                    if(k==arr.length-1){
                        System.out.print(arr[k]+"]");
                    }else{
                        System.out.print(arr[k]+",");
                    }

                }

                System.out.println();
            }
        }
    }
}
